{include file="public/head" title="维修" keywords="维修" description="维修" /}
<style>
    .toauth span p{
        line-height: 16px;
        height: 16px;
    }
</style>
<div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable">
    <!-- 菜单容器 -->

    <div class="mui-inner-wrap">
        <div id="offCanvasContentScroll" class="mui-content mui-scroll-wrapper" style="background-color: #fff;">
            <div class="mui-scroll">
                <header class="tx_head">
                    <p>
                        <a href="{:url('index')}" class="header_p1"><span class="mui-icon mui-icon-arrowleft"></span></a>
                    <h5 >余额</h5>
                    </p>
                </header>
                <main class="wdzh_main">
                    <section class="">
                        <ul class="">
                            <li class="jyjl_li" style="border-bottom: 7px solid #f3f3f3;line-height: 0;height: 0.1rem;">
                            </li>
                            <li  class="toauth" style="height: 7rem;line-height: 7rem;border-bottom: none; padding-top: 1rem;">
                                {php}$zong = $money['yue'] + $money['cz_yue']; {/php}
                                <span style="font-size: 1rem;margin-left: 1rem; display: block;width: 90%; border: 1px solid #f2f2f2;padding-left: 11px; height: 7rem; text-align: center;">总余额{$zong|default='0'}(元) = 充值金额{$money.cz_yue|default='0'}(元) + 可提现余额{$money.yue|default='0'}元</span>
                            </li>
                            <li  class="toauth" style="height: 10rem;line-height: 10rem;border-bottom: none; padding-top: 1rem; margin-top: 20px;">
                                <span style="font-size: 1rem;margin-left: 1rem; display: block;width: 90%; border: 1px solid #f2f2f2;padding:10px; height: 10rem;">

                                    <p style="display: block;height: 3rem;line-height: 3px;border-bottom: 1px solid #f2f2f2;">
                                         <label style="float: left;    height: 3rem; line-height: 3rem;margin-right: 10px;color: #000">金额:</label>
                                    <input type="text" placeholder="输入金额" name="tixian" style="float: left;width: 80%;font-size: 0.7rem;">
                                    </p>
                                    <p style="display: block;height: 3rem;line-height: 3px;border-bottom: 1px solid #f2f2f2;">
                                         <label style="float: left;height: 3rem; line-height: 3rem;margin-right: 10px;color: #000">提现账户:微信钱包</label>
                                    </p>
                                    <p style="display: block;height: 1.2rem;line-height: 1.2rem;float: right">当前只支持微信账户</p>
                                </span>
                            </li>
                            <sty>
                            <li  class="toauth" style="border-bottom: none; padding-top: 1rem; margin-top: 20px;">
                                <span style="font-size: 1rem;margin-left: 1rem; display: block;width: 90%; border: 1px solid #f2f2f2;padding:10px;">

                                    <p style="display: block;height: 2rem;line-height: 2rem;border-bottom: 1px solid #f2f2f2;" id="tixianconet">
                                         <label style="float: left;    height: 2rem; line-height: 2rem;margin-right: 10px;color: #000">提现说明</label>
                                    <p style="line-height: 1.2rem;">{$remark.tixian_content}</p>
                                    </p>
                                </span>
                            </li>
                        </ul>

                    </section>



                </main>
                <br>
                <br>
                <br>
                <br>
                <br>
                <br>

            </div>

        </div>
        <div class="mui-off-canvas-backdrop">

        </div>

    </div>

</div>
<nav style="border-top:#fff">
            <span style=" display: block;font-size: 1.2rem; float: left;background: #f2f2f2;color: #fff;width: 50%;height: 3rem; line-height: 3rem;text-align: center">
                <a href="javascript:baozjin();" style="color: #000">转为保证金</a>
            </span>
    <span style=" display: block;font-size: 1.2rem; float: left;background: #00bfb0;color: #fff;width: 50%;height: 3rem; line-height: 3rem;text-align: center">
                <a href="javascript:tixian();" style="color: #fff">立即提现</a>
            </span>
</nav>
{include file="public/footer"}
</body>
<script>
    mui('body').on('tap','a',function(){
        var str = this;
        // 强制转换为字符串
        str = String(str);

    });
    function baozjin() {
        var money = $('input[name="tixian"]').val();
        var re = /^[0-9]+.?[0-9]*$/;
        if (!re.test(money)){
            layer.msg('请填写正确的金额',{icon:2,time:1000});
            return false;
        }
        $.ajax({
            type:"post",
            url:"{:url('baozjin')}",
            data:{money:money},
            dataType:"json",
            success:function (res) {
                if (res.code == 1){
                    layer.msg(res.msg,{icon:5,time:1000},function () {
                        window.loction.href="{:url('index')}";
                    })
                }else {
                    layer.msg(res.msg,{icon:2,time:1000})
                }
            }
        })
    }
    function tixian() {
        var money = $('input[name="tixian"]').val();
        var re = /^[0-9]+.?[0-9]*$/;
        if (!re.test(money)){
            layer.msg('请填写正确的金额',{icon:2,time:1000});
            return false;
        }
       $.ajax({
           type:"post",
           url:"{:url('totixian')}",
           data:{money:money},
           dataType:"json",
           success:function (res) {
               if (res.code == 1){
                   layer.msg(res.msg,{icon:5,time:1000},function () {
                        window.loction.href="{:url('index')}";
                   })
               }else {
                   layer.msg(res.msg,{icon:2,time:1000})
               }
           }
       })
    }
</script>
</html>